home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hobby PC 13
/
Hobby PC 13.iso
/
assets
/
Asset Library
/
Multimedia
/
Java Applets
/
Message Ticker
/
fxitems.xml
< prev
next >
Wrap
Extensible Markup Language
|
2001-04-09
|
7KB
|
130 lines
<?xml version="1.0" standalone="yes"?>
<Items>
<Item CLASS="ticker" TYPE="TEXT" ID="ticker">
<Icon SRC="../java.gif"/>
<FileName SRC="Ticker.class"/>
<Title><![CDATA[<B><I>Text Ticker Applet</I></B>]]></Title>
<Description><![CDATA[This applet takes text strings and scrolls them through a text strip. Any number of text strings may be entered; they will be processed sequentially.]]></Description>
<SCRIPT LANGUAGE="JSCRIPT"><![CDATA[
var src, dest, attr, defval;
src = "%Pathname%" + "%thisItem.SQ_getChildAttribute(Filename, 0, SRC)%";
var valparamText1 = '%htmlItem.SQ_getAttribute("parText1",0,"VALUE")%';
var valparamText2 = '%htmlItem.SQ_getAttribute("parText2",0,"VALUE")%';
var valparamText3 = '%htmlItem.SQ_getAttribute("parText3",0,"VALUE")%';
var valparamText4 = '%htmlItem.SQ_getAttribute("parText4",0,"VALUE")%';
var valparamText5 = '%htmlItem.SQ_getAttribute("parText5",0,"VALUE")%';
var valappletWidth = '%htmlItem.SQ_getAttribute("appWidth",0,"VALUE")%';
var valappletHeight = '%htmlItem.SQ_getAttribute("appHeight",0,"VALUE")%';
var valparamAppBGColor = '%htmlItem.SQ_getAttribute("parAppBGColor",0,"VALUE")%';
var valparamPointSize = '%htmlItem.SQ_getAttribute("parPointSize",0,"VALUE")%';
var valparamFont = '%htmlItem.SQ_getAttribute("parFont",0,"VALUE")%';
var valparamTextColor = '%htmlItem.SQ_getAttribute("parTextColor",0,"VALUE")%';
var valparamStyle = '%htmlItem.SQ_getAttribute("parStyle",0,"VALUE")%';
var valparamHorizCenter = '%htmlItem.SQ_getAttribute("parHorizCenter",0,"VALUE")%';
var valparamVertCenter = '%htmlItem.SQ_getAttribute("parVertCenter",0,"VALUE")%';
var valparamAppBGImage = '%htmlItem.SQ_getAttribute("parAppBGImage",0,"VALUE")%';
var valparamAppTile = '%htmlItem.SQ_getAttribute("parAppTile",0,"VALUE")%';
var valparamDelayBetweenChars = '%htmlItem.SQ_getAttribute("parDelayBetweenChars",0,"VALUE")%';
var valparamDelayBetweenRuns = '%htmlItem.SQ_getAttribute("parDelayBetweenRuns",0,"VALUE")%';
var valparamXOffset = '%htmlItem.SQ_getAttribute("parXOffset",0,"VALUE")%';
var valparamYOffset = '%htmlItem.SQ_getAttribute("parYOffset",0,"VALUE")%';
var valparamSteps = '%htmlItem.SQ_getAttribute("parSteps",0,"VALUE")%';
var valparamTextCount = '%htmlItem.SQ_getAttribute("parTextCount",0,"VALUE")%';
var valparamMoveDist = '%htmlItem.SQ_getAttribute("parMoveDist",0,"VALUE")%';
var valparamReverse = '%htmlItem.SQ_getAttribute("parReverse",0,"VALUE")%';
function dropfxnow()
{
if (valparamText1 == "")
{
ans = Application.MessageBox("Please enter a text string in the appropriate field.", 0, "Text Ticker Applet");
}
else
{
var applethtml = '<APPLET CODE="Ticker.class" CODEBASE="' + attr + '" HEIGHT="' + valappletHeight + '" WIDTH="' + valappletWidth +'" ID="' + ActiveDocument.UniqueAttributeValue("ID","ticker") + '" ALT="' + valparamText1 + '"><PARAM NAME="Text1" VALUE="' + valparamText1 + '">';
if (valparamTextCount != "") {applethtml += '<PARAM NAME="TextCount" VALUE="' + valparamTextCount + '">'};
if (valparamMoveDist != "") {applethtml += '<PARAM NAME="MoveDist" VALUE="' + valparamMoveDist + '">'};
if (valparamReverse != "") {applethtml += '<PARAM NAME="Reverse" VALUE="' + valparamReverse + '">'};
if (valparamText2 != "") {applethtml += '<PARAM NAME="Text2" VALUE="' + valparamText2 + '">'};
if (valparamText3 != "") {applethtml += '<PARAM NAME="Text3" VALUE="' + valparamText3 + '">'};
if (valparamText4 != "") {applethtml += '<PARAM NAME="Text4" VALUE="' + valparamText4 + '">'};
if (valparamText5 != "") {applethtml += '<PARAM NAME="Text5" VALUE="' + valparamText5 + '">'};
if (valparamAppBGColor != "") {applethtml += '<PARAM NAME="AppBGColor" VALUE="' + valparamAppBGColor + '">'};
if (valparamPointSize != "") {applethtml += '<PARAM NAME="PointSize" VALUE="' + valparamPointSize + '">'};
if (valparamFont != "") {applethtml += '<PARAM NAME="Font" VALUE="' + valparamFont + '">'};
if (valparamTextColor != "") {applethtml += '<PARAM NAME="TextColor" VALUE="' + valparamTextColor + '">'};
if (valparamStyle != "") {applethtml += '<PARAM NAME="Style" VALUE="' + valparamStyle + '">'};
if (valparamHorizCenter != "") {applethtml += '<PARAM NAME="HorizCenter" VALUE="' + valparamHorizCenter + '">'};
if (valparamVertCenter != "") {applethtml += '<PARAM NAME="VertCenter" VALUE="' + valparamVertCenter + '">'};
if (valparamAppBGImage != "") {applethtml += '<PARAM NAME="AppBGImage" VALUE="' + valparamAppBGImage + '">'};
if (valparamAppTile != "") {applethtml += '<PARAM NAME="AppTile" VALUE="' + valparamAppTile + '">'};
if (valparamDelayBetweenChars != "") {applethtml += '<PARAM NAME="DelayBetweenChars" VALUE="' + valparamDelayBetweenChars + '">'};
if (valparamDelayBetweenRuns != "") {applethtml += '<PARAM NAME="DelayBetweenRuns" VALUE="' + valparamDelayBetweenRuns + '">'};
if (valparamXOffset != "") {applethtml += '<PARAM NAME="XOffset" VALUE="' + valparamXOffset + '">'};
if (valparamYOffset != "") {applethtml += '<PARAM NAME="YOffset" VALUE="' + valparamYOffset + '">'};
if (valparamSteps != "") {applethtml += '<PARAM NAME="Steps" VALUE="' + valparamSteps + '">'};
applethtml += '</APPLET>';
Application.FX.HTML(applethtml);
Application.FX.CopyFile(src,dst + '%Filename%');
}
}
//modify the section above; it is unique to each validating form field
function buildpath()
{
if (ActiveDocument.InCurrentProject)
{
dst = Application.ProjectDirectory + "\\applets\\ticker\\";
attr = Application.PathToURL(dst, ActiveDocument.LocalPath);
}
else
{
dst = ActiveDocument.LocalPath + "\\applets\\ticker\\";
attr = "applets/ticker/";
}
}
function prepdrop()
{
var isittext;
Application.FX.SelectDropPoint();
if (Selection.IsParentElement("BODY") == true)
{
Application.FX.SelectDropPoint();
dropfxnow();
}
else
{
ans = Application.MessageBox("Please drop the object inside the BODY element.", 0, "Text Ticker Applet");
}
}
if (ActiveDocument.LocalPath != "") // First, check if the file is saved
{
buildpath(); //build the path to the external file based on whether or not document is part of open project
prepdrop(); //determine whether or not it is legal to drop the form element at this location, or make it so
}
else
{
ans = Application.NoticeBox("Document must first be saved.", "Save now", null,"Cancel");
if (ans == 1)
{
ActiveDocument.SaveAs();
}
if (ActiveDocument.LocalPath != "") //check again if they did indeed save and name file
{
buildpath();
prepdrop();
}
}
// ]]></SCRIPT>
</Item>
</Items>